package common;

import java.util.UUID;

/**
 * @author Abyss
 * @date 2019/9/4
 * @description
 */
public final class UUIDUtils {
    public static void main(String[] args) {
        String uuid = UUID.nameUUIDFromBytes("千福23234".getBytes()).toString().replaceAll("-", "");
        String uuid2 = UUID.nameUUIDFromBytes("步步高23234".getBytes()).toString().replaceAll("-", "");
        String uuid3 = UUID.nameUUIDFromBytes("步步高23234".getBytes()).toString().replaceAll("-", "");
        String uuid4 = UUID.nameUUIDFromBytes("步步高5555".getBytes()).toString().replaceAll("-", "");
        System.out.println(uuid);
        System.out.println(uuid2);
        System.out.println(uuid3);
        System.out.println(uuid4);
    }

    public static String getUUID(String targer) {
        return UUID.nameUUIDFromBytes(targer.getBytes()).toString().replaceAll("-", "");
    }
}
